package com.hspedu.map_;

import com.hspedu.collection_.Book;

import java.util.*;

@SuppressWarnings({"all"})
public class MapSource01 {
    public static void main(String[] args) {
        Map map = new HashMap();
        map.put("邓超",new Book("",100));
        map.put("邓超","孙俪");
        map.put("王宝强","马蓉");
        map.put("刘令博",null);
        map.put(null,"刘亦菲");
        map.put("鹿晗","关晓彤");



//        map.remove(null);
//        map.clear();
//        System.out.println("map="+map);
//        System.out.println(map.get("鹿晗"));
//        System.out.println(map.isEmpty());

//

//        Set keys = map.keySet();
//        Iterator iterator = keys.iterator();
//        while (iterator.hasNext()) {
//            Object key = iterator.next();
//            Object value = map.get(key);
//            System.out.println(key + "::" +value);
//        }

        Collection values = map.values();
        for(Object value:values){
            System.out.println(value);
        }
    }
}
